<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 通过构造函数创建普通对象
        const user = new Object({ name: '小明', age: 15 })

        // 这种方式声明的变量称为【字面量】
        let student = { name: '杜子腾', age: 21 }

        // 对象语法简写
        let name = '小红';
        let people = {
            // 相当于 name: name
            name,
            // 相当于 walk: function () {}
            walk() {
                console.log('人都要走路...');
            }
        }

        console.log(student.constructor);
        console.log(user.constructor);
        console.log(student instanceof Object);
    </script>
</body>

</html>